package com.ruicar.afs.cloud.risk.tortoise.dto.response.apply;

import com.alibaba.fastjson.annotation.JSONField;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.ruicar.afs.cloud.risk.tortoise.anno.RefData;
import com.ruicar.afs.cloud.risk.tortoise.dto.response.GwtRefData;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;
import java.util.List;

/**
 * @Description
 * @Author Peng Jinbo
 * @Date 2020/07/29 14:53
 */
@Data
@Builder
@AllArgsConstructor
@NoArgsConstructor
public class GwtDutyDetail extends GwtRefData implements Serializable {

    /**
     * User code
     */
    @JsonInclude
    @JSONField(name = "usercode")
    @JsonProperty("usercode")
    private String userCode;

    /**
     * Name
     */
    @JsonInclude
    @JSONField(name = "name")
    @JsonProperty("name")
    private String name;

    /**
     * Card type
     */
    @JsonInclude
    @RefData(dicKey = "certType")
    @JSONField(name = "cardtype")
    @JsonProperty("cardtype")
    private String cardType;

    /**
     * Id card
     */
    @JsonInclude
    @JSONField(name = "card")
    @JsonProperty("card")
    private String idCard;

    /**
     * Card end date
     */
    @JsonInclude
    @JSONField(name = "carddate",format = "yyyy-MM-dd")
    @JsonProperty("carddate")
    @JsonFormat(pattern = "yyyy-MM-dd")
    private Date cardEndDate;

    /**
     * Birthday
     */
    @JsonInclude
    @JSONField(name = "birthday",format = "yyyy-MM-dd")
    @JsonProperty("birthday")
    @JsonFormat(pattern = "yyyy-MM-dd")
    private Date birthday;

    /**
     * Sex
     */
    @JsonInclude
    @RefData(dicKey = "sex")
    @JSONField(name = "sex")
    @JsonProperty("sex")
    private String sex;

    /**
     * Marry status
     */
    @JsonInclude
    @RefData(dicKey = "maritalStatus")
    @JSONField(name = "marriagestatus")
    @JsonProperty("marriagestatus")
    private String marryStatus;

    /**
     * Education
     */
    @JsonInclude
    @RefData(dicKey = "highestEducation")
    @JSONField(name = "education")
    @JsonProperty("education")
    private String education;

    /**
     * Phone
     */
    @JsonInclude
    @JSONField(name = "phone")
    @JsonProperty("phone")
    private String phone;

    /**
     * Age year
     */
    @JsonInclude
    @JSONField(name = "ageofyear")
    @JsonProperty("ageofyear")
    private String ageYear;

    /**
     * Age month
     */
    @JsonInclude
    @JSONField(name = "ageofmonth")
    @JsonProperty("ageofmonth")
    private String ageMonth;

    /**
     * Outside phone
     */
    @JsonInclude
    @JSONField(name = "phone2")
    @JsonProperty("phone2")
    private String outsidePhone;

    /**
     * Income
     */
    @JsonInclude
    @JSONField(name = "pincome")
    @JsonProperty("pincome")
    private BigDecimal income;

    /**
     * Family income
     */
    @JsonInclude
    @JSONField(name = "fincome")
    @JsonProperty("fincome")
    private BigDecimal familyIncome;

    /**
     * Month repay
     */
    @JsonInclude
    @JSONField(name = "payment")
    @JsonProperty("payment")
    private BigDecimal monthRepay;

    /**
     * Family spend
     */
    @JsonInclude
    @JSONField(name = "expenditure")
    @JsonProperty("expenditure")
    private BigDecimal familySpend;

    /**
     * Un repay loan amt
     */
    @JsonInclude
    @JSONField(name = "loan")
    @JsonProperty("loan")
    private BigDecimal unRepayLoanAmt;

    /**
     * Base province
     */
    @JsonInclude
    @RefData(useFieldName = true)
    @JSONField(name = "province")
    @JsonProperty("province")
    private String baseProvince;
    /**
     * Base province name
     */
    @JSONField(serialize = false)
    @JsonIgnore
    private String baseProvinceName;

    /**
     * Base city
     */
    @JsonInclude
    @RefData(useFieldName = true)
    @JSONField(name = "city")
    @JsonProperty("city")
    private String baseCity;
    /**
     * Base city name
     */
    @JsonIgnore
    @JSONField(serialize = false)
    private String baseCityName;

    /**
     * Company name
     */
    @JsonInclude
    @JSONField(name = "company")
    @JsonProperty("company")
    private String companyName;


    /**
     * Industry type
     */
    @JsonInclude
    @RefData(dicKey = "industryType")
    @JSONField(name = "caparty01")
    @JsonProperty("caparty01")
    private String industryType;

    /**
     * Job type
     */
    @JsonInclude
    @RefData(dicKey = "jobsType")
    @JSONField(name = "occupationaltype")
    @JsonProperty("occupationaltype")
    private String jobType;

    /**
     * Job position
     */
    @JsonInclude
    @RefData(dicKey = "position")
    @JSONField(name = "caparty04")
    @JsonProperty("caparty04")
    private String jobPosition;

    /**
     * Working limit
     */
    @JsonInclude
    @JSONField(name = "workinglife")
    @JsonProperty("workinglife")
    private String workingLimit;

    /**
     * Company phone
     */
    @JsonInclude
    @JSONField(name = "phonec")
    @JsonProperty("phonec")
    private String companyPhone;

    /**
     * Driver licence
     */
    @JsonInclude
    @RefData(dicKey = "drivingType",translatedKey = "tortoiseDrivingType")
    @JSONField(name = "driverlicense")
    @JsonProperty("driverlicense")
    private String driverLicence;

    /**
     * Driver no
     */
    @JsonInclude
    @JSONField(name = "driverno")
    @JsonProperty("driverno")
    private String driverNo;

    /**
     * Address list
     */
    @JsonInclude
    @JSONField(name = "caaddress")
    @JsonProperty("caaddress")
    private List<GwtAddress> addressList;

    @JsonInclude
    @RefData(dicKey = "custRelation")
    @JSONField(name = "relationship")
    @JsonProperty("relationship")
    private String relationship;
}
